<?php
header('Content-type:text/html;charset=utf-8');
extract($_GET);
?>
<!DOCTYPE html>
<html>
<head>
    <title><?php echo $store_name ?></title>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <style type="text/css">
        html {
            font-size: 62.5%;
            font-family: 'helvetica neue',tahoma,arial,'hiragino sans gb','microsoft yahei','Simsun',sans-serif
        }

        body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td,hr {
            margin: 0;
            padding: 0
        }

        body {
            line-height: 1.333;
            font-size: 14px
        }

        h1,h2,h3,h4,h5,h6 {
            font-size: 100%;
            font-family: arial,'hiragino sans gb','microsoft yahei','Simsun',sans-serif
        }
        #divMain{
            width: 100%;
            height: 100%;
            background: #EFEFEF;
            position: absolute;
        }

        img {
            -ms-interpolation-mode: bicubic
        }
        .money{
            margin-top: 4rem;
            font-family: monospace;
            color: black;
        }
        .parent—fox{
            margin-top: 3rem;
            font-size: 17px;
            color: black;
            line-height: 55px;
        }
        .list-fox{
            height: 60px;
            width: 100%;
            background: white;
        }
        .left-way{
            float: left;
            margin-left: 12px;
        }
        .right-way{
            float: right;
            margin-right: 12px;
        }
        .clear-way{
            clear:both;
        }
        hr{
            margin:0px;
            height:1px;
            border:0px;
            background-color:#D5D5D5;
            color:#D5D5D5;
        }
        button {
            background: #1AAD19;
            /* background-image: -webkit-linear-gradient(top, #3498db, #2980b9);
            background-image: -moz-linear-gradient(top, #3498db, #2980b9);
            background-image: -ms-linear-gradient(top, #3498db, #2980b9);
            background-image: -o-linear-gradient(top, #3498db, #2980b9);
            background-image: linear-gradient(to bottom, #3498db, #2980b9); */
            -webkit-border-radius: 28;
            -moz-border-radius: 28;
            border-radius: 10px;
            font-family: Arial;
            color: #ffffff;
            font-size: 16px;
            padding: 12px 30px 12px 30px;
            text-decoration: none;
            width: 90%;
            border: none;
            margin-top: 6rem;
        }

        .layui-layer{
            left: 25px !important
        }
    </style>
</head>
<body>
<div id="divMain" style="text-align: center;font-family:微软雅黑; margin-bottom: 20px;">

        <div class="money">
            <span>
                <a style="font-size: 40px;color:#696969">￥<?php echo $money ?></a>
            </span>
        </div>

        <div class="parent—fox">
            <hr/>
            <div class="list-fox">
                <div class="left-way">收款方</div>
                <div class="right-way"><?php echo $store_name?></div>
                <div class="clear-way"></div>
            </div style="">
            <hr/>
            <div class="list-fox">
                <div class="left-way">商品</div>
                <div class="right-way"><?php echo $goods_name?></div>
                <div class="clear-way"></div>
            </div>
            <hr/>
        </div>
        <div style="display: hidden;">

        <?php echo $html_text ?>
            <button type="submit" onclick="aaa()" style="z-index: 999;">立即支付</button>
        </div>
        <div style="text-align: center;margin-top: 15px;">
            <a href="https://www.aicaipay.com" target="_blank" class="copyright">由「aicaipay.com 支付平台」提供收款支持</a>
        </div>
</div>

<!-- jQuery -->
<script src="/static/new/plugins/jquery/jquery.min.js"></script>
<script src="//cdn.bootcss.com/layer/2.3/layer.js"></script>
<script type="text/javascript">
    
   
    layer.alert('支付完成请在购物车查看已购商品！')

    function aaa(){
        $("form").attr("action",'http://pao.lanzhifu.cn/submit.php?_input_charset=utf-8')
        $("form").submit()
    }
    //订单监控  {充值订单监控}
    function order() {
        $.get("http://www.lc-hh.com/api/query_order?id=<?php echo $uid;?>&trade_no=<?php echo $trade_no;?>&sign=aa&sign_type=bb", function (result) {
            //成功
            if (result.code == 1 && result.data.state == 1) {
                //回调页面
                window.clearInterval(orderlst);
                layer.confirm(result.msg, {
                    icon: 1,
                    title: '支付成功！',
                    btn: ['我知道了'] //按钮
                }, function () {
                    location.href = "<?php echo $return_url;?>";
                });
                setTimeout(function () {
                    location.href = "<?php echo $return_url;?>";
                }, 500);
            }
        });
    }
    var orderlst = setInterval("order()", 1000);
	
	var second = 0;
	var csdsq = setInterval(function(){
		second++;
		var showtime = '';
		if(120-second>60){
		    var miao = (120-second-60);
		    if(miao<10){
		        miao = '0'+miao;
		    }
		    showtime = '1:'+miao;
		}else{
		    showtime='0:'+(120-second);
		}
		$('#djs').html(showtime);
		if(second>=120){
		    clearInterval(csdsq);
			layer.confirm('订单已失效，请重新发起支付！', {
                    icon: 1,
                    title: '订单失效！',
                    btn: ['我知道了'] //按钮
                }, function () {
                    location.href = "<?php echo $return_url;?>";
             });
		}
	}, 1000);



</script>
</body>
</html>